package com.noahplat.alarm.feign;



import com.noahplat.alarm.pojo.Alarm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 报警信息模块对外Feign
 * 宋彦磊
 * 2021.03.15
 */
@FeignClient(name = "alarm")
@Component
public interface AlarmFeign {
    /**
     * 登记报警信息并极光推送信息
     */
    @PostMapping("/api/alarm/addAlarm")
    @Async("getThreadPoolExecutor")
    public void addAlarm(Alarm alarm, @RequestHeader("Authorization")String token);
}
